This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jan 12, 2012, 2:13 PM
46 Posts
topic has been resolvedResolved

Check Box Group - values sum

  • Category: Dojo and Client Side JavaScript
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags: Check Box
  • Replies: 2
How to get the sum of the values ​​given in Check Box Group:
 


If all are marked should get the result 6 in compiuted field.
 
 

Jan 12, 2012, 2:26 PM
272 Posts
Re: Check Box Group - values sum
Hi,
 
how about this:
 
var sum = 0;
try{
   var values = getComponent("checkBoxGroup1").value;
  
   for( var i=0; i<values.length; i++ ){
      sum = sum + @TextToNumber(values[i]);
   }
catch(e){}

return sum


Sven
 
Jan 13, 2012, 8:54 AM
46 Posts
Re: Check Box Group - values sum
Hallo Sven thank you for your answer it works perfectly.



This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal